package com.zhj.rpc.customer;


import com.zhj.rpc.netty.NettyClient;
import com.zhj.rpc.service.HelloService;

/**
 * 启动服务的提供者
 * @author zhj
 */
public class ClientBootstrap {

    public static final String providerName = "RPC-Dubbo-Hello#zhj#";

    public static void main(String[] args) {
        NettyClient customer = new NettyClient();
        // NativeRegistry.get(HelloService.class.getName(), new URL("127.0.0.1",8080));
        // 创建代理对象
        HelloService service = (HelloService) customer.getBean(HelloService.class, providerName);
        String msg = service.sayHello("dubbo~");
        System.out.println("客户端发送：" + msg);
    }
}
